<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script>
			var array = new Array(1,2,3,4,5,6,7,8,9,7,14,5,1);
			
			//使用for循环
			for(var i=0;i<array.length;i++){
				console.log(array[i]);
			}
			//使用for/in
			for(var i in array){
				console.log(array[i]);
			}
			//使用while 
			var i = 0;
			while(i<array.length){
				console.log(array[i]);
				i++;
			}
			//使用do/while 
			var i = 0;
			do{
				console.log(array[i]);
				i++;
			}while(i<array.length)
		</script>
	</body>
</html>